[PATCH] script: abort if unused arguments are given
authorChris Hofstaedtler <zeha@debian.org>
Fri, 18 Nov 2022 13:23:37 +0000 (13:23 +0000)
committerChris Hofstaedtler <zeha@debian.org>
Fri, 25 Nov 2022 15:19:08 +0000 (15:19 +0000)
commit78d1423bcd5dd494867140906fc3f038de0d867d
treebd49a98d14a76bd42c67f4319def163b52965305
parent1b82110ae1c728916c9fd241ed1d73781e878d23
[PATCH] script: abort if unused arguments are given

scripts uses either a free-standing "file" argument, or the value
passed as --log-out "file". Additional filenames are ignored.
They are also ignored if --log-in "file" is given, as it turns off
output logging by default (can still be overriden by adding --log-out).
Avoid surprises when passing multiple filenames by writing usage
message instead.

[kzak@redhat.com: - use errtryhelp() rather than usage()]

Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1016193
Signed-off-by: Karel Zak <kzak@redhat.com>
Gbp-Pq: Topic upstream
Gbp-Pq: Name PATCH-script-abort-if-unused-arguments-are-given.patch
term-utils/script.c